﻿@model IEnumerable<GroupMember>

@if (Model != null && Model.Count() > 0)
{
    var currentUser = UserContext.CurrentUser;

    <div class="tn-box tn-widget tn-widget-content tn-corner-all spb-group-new-members">
        <div class="tn-box-header tn-widget-header tn-corner-top tn-border-bottom">
            <h3 class="tn-helper-reset">欢迎新人</h3>
        </div>
        <div class="tn-box-content tn-widget-content tn-corner-bottom">
            <ul class="tn-user-list">
                @foreach (var member in Model)
                { 
                    <li class="tn-user-item tn-helper-clearfix">
                        <div class="tn-pic">
                            @Html.ShowUserAvatar(member.UserId, AvatarSizeType.Small, true)
                        </div>
                        <div class="tn-con">
                            <div class="tn-name">@Html.Link(member.User.DisplayName, SiteUrls.Instance().SpaceHome(member.UserId), member.User.DisplayName, new { @class = "tn-user-name" }, HyperLinkTarget._blank)</div>
                            @if (currentUser != null && !currentUser.IsFollowed(member.UserId))
                            {
                                <div class="tn-act">@Html.FollowUser(member.UserId, "收藏")</div>
                            }
                        </div>
                    </li>
                }
            </ul>
        </div>
    </div>
}